from __init__ import db
import datetime

class User( db.Model ):
    __tablename__ = 'user'
    __table_args__ = {
        'mysql_charset': 'utf8mb4'
    }
    id = db.Column( db.INT , primary_key=True , autoincrement=True )
    nickname = db.Column(nullable=False)
    password = db.Column(nullable=False)
    avator = db.Column(default="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg")
    level = db.Column( default=1)
    coin = db.Column( default=0)
    role = db.Column(default="user" )
    mail = db.Column(nullable=False)
    qq = db.Column( nullable=False )
    sign = db.Column( nullable=False )
    lastsign = db.Column(default=datetime.datetime.now())
    lasttalk = db.Column( default=datetime.datetime.now() )
